package com.ruoyi.common.core.constant;

/**
 * 缓存常量信息
 *
 * @author ruoyi
 */
public class CacheConstants
{
    /**
     * 缓存有效期，默认720（分钟）
     */
    public final static long EXPIRATION = 720;

    /**
     * 缓存刷新时间，默认120（分钟）
     */
    public final static long REFRESH_TIME = 120;

    /**
     * 密码最大错误次数
     */
    public final static int PASSWORD_MAX_RETRY_COUNT = 5;

    /**
     * 密码锁定时间，默认10（分钟）
     */
    public final static long PASSWORD_LOCK_TIME = 10;

    /**
     * 权限缓存前缀
     */
    public final static String LOGIN_TOKEN_KEY = "login_tokens:";
    public final static String VIDEO_CREATE_USER = "user:videos:";
    public final static String TEMP_VIDEO_CREATE_USER = "user:temp:videos:";
    public final static String MEMBER_INFO_USER = "member:info:user:";
    public final static String TEMP_VIDEO_URL_USER = "user:temp:videosUrl";
    public final static String VIDEO_HASH_USER = "user:temp:videos_hash:";
    public final static String ALIYUN_MP3_TO_TEXT = "aliyun:mp3ToText";

    /**
     * 验证码 redis key
     */
    public static final String CAPTCHA_CODE_KEY = "captcha_codes:";

    /**
     * 参数管理 cache key
     */
    public static final String SYS_CONFIG_KEY = "sys_config:";

    /**
     * 字典管理 cache key
     */
    public static final String SYS_DICT_KEY = "sys_dict:";

    /**
     * 登录账户密码错误次数 redis key
     */
    public static final String PWD_ERR_CNT_KEY = "pwd_err_cnt:";

    /**
     * 登录IP黑名单 cache key
     */
    public static final String SYS_LOGIN_BLACKIPLIST = SYS_CONFIG_KEY + "sys.login.blackIPList";
    public static final String WATCH_VIDEO_NUM = "user:video:num:";//视频号广告中的次数
    public static final String WATCH_VIDEO_DOU_YIN_NUM = "douyin:video:num:";//抖音广告中的次数
    public static final String DOUYIN_CREATE = "douyin:video:";//抖音视频
    public static final String DOUYIN_CREATE_HASH = "douyin:video:hash:";//抖音视频

    public static final String WATCH_VIDEO_XIAO_HONG_SHU_NUM = "xiaohongshu:video:num:";//小红书广告中的次数
    public static final String XIAOHONGSHU_CREATE = "xiaohongshu:video:";//小红书视频
    public static final String XIAOHONGSHU_CREATE_HASH = "xiaohongshu:video:hash:";//小红书视频
    public static final String WX_WATCH_VIDEO_NUM = "wx:video:num:";//微信发送的视频的次数
    public static final String MEMBER_INFO_USER_NOT_BUY = "member:user:not:buy";
}
